package account.webapi;

class ResultSuccess<T> implements Result<T> {
    private final String status;
    private final T data;

    public ResultSuccess(T data) {
        this.data = data;
        status = (null == data) ? "ERROR" : "SUCCESS";
    }

    @Override
    public String getStatus() {
        return status;
    }

    @Override
    public T getData() {
        return data;
    }
}
